<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/validate.jsp"%>
<%!
	String list(Input input) {
		Message msg = new Message();
		String keywords = input.getDesc("keywords", "");
		if (keywords.length() == 0) {
			return new Message(30041, "请填写关键字").toJson();
		}	
		List<Map> list = QBuilder.db("basedb").select("distinct new map(name as name)").from("disease").where(new Where("name like '%" +  keywords + "%' or pinyin like '%" + keywords + "%'" )).order("pinyin", "asc").query().getResultObj();
		msg.put("data", list);
		return msg.toJson();
	}
%>
<%
	Tools.encryptPrint(out, list(input));
%>
